// 需要永久存储，且下次APP启动需要取出的，在state中的变量名
let saveStateKeys = [];

const setItem = (key, value) => {
  let persistData = {};
  persistData = uni.getStorageSync('persistData') || {}
  persistData[key] = value
  uni.setStorageSync('persistData', persistData)
}

const getItem = (key) => {
  let persistData = {};
  persistData = uni.getStorageSync('persistData') || {}
  if (persistData && persistData[key]) {
    return persistData[key]
  } else {
    return undefined
  }
}

export {
  setItem,
  getItem
}
